package com.ctshk.rpc.starvip.factory.member;

import com.ctshk.rpc.starvip.dto.start_vip.member.ListOfMembers;
import com.ctshk.rpc.starvip.dto.start_vip.member.Member;
import com.ctshk.rpc.starvip.dto.start_vip.member.MemberOperation;
import com.ctshk.rpc.starvip.factory.StarVipReqProvider;
import com.ctshk.rpc.starvip.req.member.MemberResetPasswordReq;
import com.google.common.collect.Lists;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.starvip.factory.member
 * @Author: hef
 * @CreateTime: 2021-04-12 19:29
 * @Description: 会员密码重置
 */
public class ResetPasswordFactory extends StarVipReqProvider<MemberResetPasswordReq> {


    public ResetPasswordFactory(MemberResetPasswordReq memberResetPasswordReq) {
        super(memberResetPasswordReq);
    }

    @Override
    public MemberOperation produce() {
        MemberOperation memberOperation = new MemberOperation();
        memberOperation.setMessageId("1-FVJ2");
        memberOperation.setIntObjectName("CST Reset Password");
        memberOperation.setInterfaceId("CTS_IF_09");
        memberOperation.setOperation("Update");
        memberOperation.setMessageType("Integration Object");
        memberOperation.setIntObjectFormat("Siebel Hierarchical");
        memberOperation.setListOfMembers(new ListOfMembers(
                Lists.newArrayList(
                        new Member(req.getType(), req.getValue(), req.getMemberType())
                )
        ));
        return memberOperation;
    }
}
